<include file="Public/header" /> 

<!--主窗体-->
<div class="container app">
	<!--左侧菜单-->
	<include file="Public/sidebar" /> 
	<!--左侧菜单//-->
	
	<!-- mainCon -->
	<div id="mainCon" class="mainCon">
		<h4>会员申请审核</h4>
		<form class="form-horizontal" id="myform" name="myform">
			<div class="form-group">
				<label for="title" class="col-sm-2 control-label">真实姓名</label>
				<div class="col-sm-5">
					<input type="text" class="form-control" name="name" readonly="readonly" id="name" value="<{$pos_info['name']}>" placeholder="文章标题">
				</div>
			</div>
			
			<div class="form-group">
				<label for="title" class="col-sm-2 control-label">身份证号</label>
				<div class="col-sm-5">
					<input type="text" class="form-control" name="identity" readonly="readonly" id="identity" value="<{$pos_info['identity']}>" placeholder="文章标题">
				</div>
			</div>
			
			<div class="form-group">
				<label for="title" class="col-sm-2 control-label">手机号码</label>
				<div class="col-sm-5">
					<input type="text" class="form-control" name="mobile" readonly="readonly" id="mobile" value="<{$pos_info['mobile']}>" placeholder="文章标题">
				</div>
			</div>
			
			<div class="form-group">
				<label for="title" class="col-sm-2 control-label">收货地址</label>
				<div class="col-sm-5">
					<input type="text" class="form-control" name="address" readonly="readonly" id="address" value="<{$pos_info['address']}>" placeholder="文章标题">
				</div>
			</div>
			<style>
				.img_size{width:200px;height:200px}
			</style>
			<div class="form-group">
				<label for="title" class="col-sm-2 control-label">身份证正面</label>
				<div class="col-sm-5">
					<img src="<{$pos_info['identity_picture'][0]}>"class="img_size" />
				</div>
			</div>
			<div class="form-group">
				<label for="title" class="col-sm-2 control-label">身份证反面</label>
				<div class="col-sm-5">
					<img src="<{$pos_info['identity_picture'][1]}>"class="img_size" />
				</div>
			</div>
			<div class="form-group">
				<label for="title" class="col-sm-2 control-label">银行卡正面</label>
				<div class="col-sm-5">
					<img src="<{$pos_info['bank_picture'][0]}>" class="img_size"/>
				</div>
			</div>	
			<div class="form-group">
				<label for="title" class="col-sm-2 control-label">银行卡反面</label>
				<div class="col-sm-5">
					<img src="<{$pos_info['bank_picture'][1]}>" class="img_size"/>
				</div>
			</div>
			<div class="form-group">
				<label for="title" class="col-sm-2 control-label">手持身份证相片</label>
				<div class="col-sm-5">
					<img src="<{$pos_info['people_picture'][0]}>" class="img_size"/>
				</div>
			</div>
			<div class="form-group">
				<label for="title" class="col-sm-2 control-label">手持银行卡相片</label>
				<div class="col-sm-5">
					<img src="<{$pos_info['people_picture'][1]}>" class="img_size"/>
				</div>
			</div>
			
			
			<div class="form-group">
				<label for="title" class="col-sm-2 control-label">状态</label>
				<div class="col-sm-5">
					<div class="btn btn-default" disabled>
						<if condition="$pos_info['status'] eq 0">
							申请中
						<elseif condition="$pos_info['status'] eq 1"/>
							审核通过 
						<elseif condition="$pos_info['status'] eq -1"/>
							审核不通过 
						</if>
					</div>
				</div>
			</div>
			
			<div class="form-group">
				<div class="col-sm-offset-2 col-sm-10">
					<input type="hidden" name="id" value="<{$info['id']}>"/>
					<if condition="$pos_info['status'] != '-1' and $pos_info['status'] != '1'">	
					<button  onclick="return pass(this)" data-status="1" class="btn btn-default col-sm-2">审核通过</button>
					<button  onclick="return pass(this)" data-status="-1" style="margin-left:50px" class="btn btn-default col-sm-2">不通过</button>
					</if>
				</div>
			</div>
			
		</form>
		<input type='hidden' name="aid" id="aid" value="<{$pos_info['id']}>">
	</div>
	<!-- mainCon// -->
	
</div>
<!--主窗体//-->

<script src="__PUBLIC__/js/layer/layer.js"></script>
<script src="__PUBLIC__/js/validate/jquery.validate.min.js"></script>
<script src="__PUBLIC__/js/validate/messages_zh.js"></script>
<script>
function pass(obj){
	var status = $(obj).attr('data-status');
	var aid    = $('#aid').val();
	var pn = $("#pn").val();
	
	if(status == 1){
		var text = "您确定此会员通过审核？";
	}else if(status == -1){
		var text = "您确定此会员作废？";
	}
	
	var index =	layer.confirm(text, {
		btn: ['确定','取消'] //按钮
	}, function(){		
		$.post("<{:U('User/pos_info')}>",{id:aid,status:status,p:pn},function(r){
			if(r.error == '0'){
				layer.alert(r.errmsg,{icon: 1},function(){
					window.location.href = r.url;
				});
			}else{
				window.location.href = r.url;
			}
		},'json');
	}, function(){
		layer.close(index);
	});

	return false;
}
</script>

<include file="Public/footer" /> 